NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A TB46
System Menu IDs


Q: The Help, Keyboard, and Application menus at the right of the Macintosh menu bar don't have text titles that can be included in a command string in the way that "File" or "Edit" can be. Do these menus always have the same menu ID?

A: Yes. The menu IDs of the Help, Keyboard, and Application menus are always the same, so the menus can always be identified by their IDs via a call to GetMenuHandle:

enum
{
    kMenuHelpID             = -16490, // value also in "Balloons.h"
    kMenuKeyboardID         = -16491,
    kMenuApplicationID      = -16489
};

Note that passing kMenuHelpID to GetMenuItemHandle may obtain the menu handle of the global help menu, which is generally not what you want. To customize the Help menu, call HMGetHelpMenuHandle.

Further Reference:

Inside Macintosh: Menu Manager
Inside Macintosh: Help Manager

[Dec 22 1998]


Developer Documentation | Technical Notes | Development Kits | Sample Code